﻿using System;
using System.Globalization;
using Spring.Context;
using Spring.Context.Support;

namespace SpringSeries.Core.ResourceSetMessageSource {
    class Program {
        static void Main(string[] args) {
            string KEY = "HelloMessage";

            IApplicationContext _ctx = ContextRegistry.GetContext();

            CultureInfo _usCulture = new CultureInfo("en-US");

            Console.WriteLine("Culture corrente: {0}", System.Threading.Thread.CurrentThread.CurrentUICulture.DisplayName);
            Console.WriteLine("Messaggio con la Culture corrente: {0}", _ctx.GetMessage(KEY));
            Console.WriteLine("Messaggio con la Culture en-US: {0}", _ctx.GetMessage(KEY, _usCulture));

            Console.Read();
        }
    }
}
